﻿using BLL.Dal;
using BLL.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SysAdmin_Template_News_Edit : System.Web.UI.Page
{
    public string news_type = "";
    public string news_key = "";
    public string news_title = "";
    public string news_content = "";
    public string news_source = "";
    public string news_author = "";
    public string news_keyword = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["news_key"] != null && Request["news_key"] != "")
            {
                CommNewsDAL newsDAL = new CommNewsDAL();
                CommNews newsModel = newsDAL.GetModel(Request["news_key"].ToString());

                if (newsModel != null)
                {
                    news_key = Request["news_key"].ToString();
                    news_type = newsModel.NewsType;
                    news_title = newsModel.Title;
                    news_content = newsModel.Content;
                    news_source = newsModel.NewSource;
                    news_author = newsModel.Author;
                    news_keyword = newsModel.KeyWord;
                }
            }
        }
    }
}